﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="QuickTools.ascx.cs" Inherits="CMS_QuickTools" %>
<div>

    <script>
    function AddFavorite(sURL, sTitle) {
        try {
            window.external.addFavorite(sURL, sTitle);
        } catch (e) {
            try {
                window.sidebar.addPanel(sTitle, sURL, "");
            } catch (e) {
                alert("加入收藏失败,请手动添加.");
            }
        }
    }
    function setHomepage(pageURL) {
        if (document.all) {
            document.body.style.behavior = 'url(#default#homepage)';
            document.body.setHomePage(pageURL);
        }
        else if (window.sidebar) {
            if (window.netscape) {
                try {
                    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                }
                catch (e) {
                    alert("该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项signed.applets.codebase_principal_support 值该为true");
                }
            }
            var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
            prefs.setCharPref('browser.startup.homepage', pageURL);
        }
    } 
    </script>

    </script>
    <div style="border-bottom: 1px solid #cccccc; line-height: 50px;">
        <img src="images/plugin_edit.jpg" />
        <strong style="font-size: 25px">快捷工具 </strong>
    </div>
    <ul style="list-style: none; margin-left: 5px; line-height: 30px;">
        <li><a href="javascript:setHomepage('http://www.usas.com.cn:1276/EEPWebClient/InfoLogin.aspx')"
            class="link" style="font-size: 15px; text-decoration: none;">设为首页</a></li>
        <li><a href="javascript:AddFavorite(location.href, document.title);" class="link"
            style="font-size: 15px; text-decoration: none;">收藏此页</a></li>
    </ul>
</div>
<br />
